====== Logwatch ======
Logwatch is a tool that will monitor your server's logs and email the administrator a digest on a daily basis.

===== Installation =====

==== Prerequisites ====

  * Ensure email is working. Instructions for doing so may be found in MailServer.

  * Turn on universe repository. Instructions for doing so may be found in Repositories.

==== Instructions ====

Configurer le client SMTP : [[postfix|postfix]]

Update your package list with:

<code>$ sudo apt-get update</code>
Install Logwatch with:

<code>$ sudo apt-get install logwatch</code>
==== Notes ====

Create a directory the Logwatch package in the repositories currently does not create, but is required for proper operation:


<code>$ sudo mkdir /var/cache/logwatch</code>
Configuration shouldn't be edited in the install directory (''/usr/share/logwatch''). Copy logwatch.conf to'' /etc/logwatch'' before editing:


<code>$ sudo cp /usr/share/logwatch/default.conf/logwatch.conf /etc/logwatch/conf/</code>
Edit ''logwatch.conf'' to put in the e-mail where you want the report sent:

<code>MailTo = me@example.com</code>
Detail level of the logwatch report can be Low, Med or High. Default level is Low. To change that, edit the newly copied ''logwatch.conf'':

<code>Detail = High</code>
For Ubuntu systems with apache server:

Copy ''/usr/share/logwatch/default.conf/logfiles/http.conf'' to ''/etc/logwatch/conf/logfiles''
<code>sudo cp /usr/share/logwatch/default.conf/logfiles/http.conf /etc/logwatch/conf/logfiles/</code>
and add ''*combined.log'' files to the list

===== See Also =====

  * **(en)** [[http://www.stellarcore.net/logwatch/tabs/docs/HOWTO-Customize-LogWatch.html|Logwatch customization Howto]]